package com.gz.logistics.library.pojo;

import org.json.JSONArray;
import org.json.JSONException;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016-04-28.
 */
public class ClothesSpecial extends CustomerSpinnerObject {
    private int id;
    private String process;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getProcess() {
        return process;
    }

    public void setProcess(String process) {
        this.process = process;
    }
    public String toString(){return process;}
    public static List<ClothesSpecial> parse(JSONArray jsonArray) throws JSONException {
        if (jsonArray == null || jsonArray.length() <= 0){
            return null;
        }
        List<ClothesSpecial> specials = new ArrayList<ClothesSpecial>();
        for (int i = 0 ; i < jsonArray.length() ; i ++ ){
            ClothesSpecial info = new ClothesSpecial();
            info.id = (jsonArray.getJSONObject(i)).getInt("id");
            info.process = (jsonArray.getJSONObject(i)).getString("process");
            specials.add(info);
        }
        return specials;
    }
}
